// 定义服务层
app.service('brandService', function ($http) {
    this.findAll = function () {
        return $http.get('../brand/findAll');
    };

    this.findPage = function (page, rows) {
        return $http.get("../brand/findByPage/" + page + "/" + rows);
    };

    this.add = function (brand) {
        return $http.post('../brand/add', brand);
    };

    this.update = function (brand) {
        return $http.post('../brand/update', brand);
    };

    this.findById = function (id) {
        return $http.get('../brand/findById?id=' + id);
    };

    this.dele = function (ids) {
        return $http.get('../brand/delete/' + ids);
    };
});